#include<cstdio>
//打印所有不超过256，其平方具有对称性质的数
int Reverse(int n) {
    //先找逆序数
    int remain;
    int reverse = 0;
    while(n > 0)
    {
        remain = n%10;
        n = n/10;
        reverse = reverse*10 + remain;
    }
}

int main() {
    for(int n=0;n<=256;++n){
        int reverse= Reverse(n*n);
        if(n*n == reverse){
            printf("%d\n",n);
        }
    }
    return 0;
}
